package com.qf.work.mapper;

import com.qf.work.entity.Workorder;
import com.qf.work.entity.WorkorderExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkorderMapper {
    long countByExample(WorkorderExample example);

    int deleteByExample(WorkorderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Workorder record);

    int insertSelective(Workorder record);

    List<Workorder> selectByExample(WorkorderExample example);

    Workorder selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Workorder record, @Param("example") WorkorderExample example);

    int updateByExample(@Param("record") Workorder record, @Param("example") WorkorderExample example);

    int updateByPrimaryKeySelective(Workorder record);

    int updateByPrimaryKey(Workorder record);
    /**
     * 根据工单编号的id查询项目信息和项目名称
     * @param id
     * @return
     */
    Workorder findById(Integer id);

    /**
     * 根据air的district_id查询空气质量信息和区域名称
     * @param projectId
     * @return
     */
    List<Workorder> findByworkId(Integer projectId);
}